package com.xiangxiao.rpan.gateway;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.util.Date;

/**
 * @auther xiangxiao
 * @email 573768011@qq.com
 * @data 2023/2/13 16:41
 */
@EnableZuulProxy
//@EnableEurekaServer
@SpringBootApplication(scanBasePackages = "com.xiangxiao.rpan.gateway")
@RestController
@EnableFeignClients
public class Application {
  private static Logger logger = LoggerFactory.getLogger(Application.class);

  public static void main(String[] args) throws Exception {
    SpringApplication.run(Application.class, args);
    logger.info(" ---- rpan-gateway start successfully  ----- ");
  }

//  @RequestMapping("/")
//  String index() {
//    RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean();
//    String str = "<h1>Hello, rpan-gateway!</h1>"
//        + "<br/> server start at : " + new Date(bean.getStartTime()).toLocaleString();
//    return str;
//  }

}
